<template>
    <ul class="clearfix">
        <li :class="listItemStyle" class="clearfix" v-for="l in goodsInfo.rows">
            <div class="list-img">
                <router-link :to="'/ticketDesc?itemId='+l.id">
                    <img :src="l.imgUrl" style="width:100%;" alt="">
                </router-link>
                <p class="big-location">{{l.address}}</p>
            </div>
            <div class="list-txt">
                <h3>
                    <router-link :to="'/ticketDesc?itemId='+l.id">
                        <span v-html="'['+l.areaName+']'+ l.itemName"></span>
                    </router-link>
                </h3>
                <p class="list-txt-des">
                    <span v-html="l.abstractMessage"></span>
                </p>
                <p class="list-text-time">
                    <Icon type="md-time" />
                    {{l.endTime}}
                </p>
                <p class="list-txt-loca">
                    <Icon type="md-pin" />
                    {{l.address}}
                </p>
                <p class="list-txt-price">
                    <span>{{l.minPrice}}-{{l.maxPrice}}元</span>
                    售票中
                </p>
                <p class="list-txt-elec">
                    <Icon type="md-qr-scanner" />
                    电子票
                </p>
            </div>
        </li>
    </ul>
    <Page :total="goodsInfo.total" :page-size="goodsInfo.pageSize" show-total class="text-center my-4" @on-change="pageChange"/>
</template>
<script>
export default {
    props:{
        listItemStyle:{
            type:String,
            default:''
        },
        goodsInfo:{
            type:Object
        }
    },
    emits:["pageChange"],
    methods:{
        pageChange(page){
            this.$emit("pageChange",page);
        }
    }
}
</script>
<style>
    /* 组件样式 */
    .list-item{
        padding: 25px 10px 18px;
        border-bottom: 1px dotted #cecece;
        margin: 0 10px;
    }
    .list-item .list-img{
        width: 150px;
        height: 206px;
        overflow: hidden;
        margin-right: 20px;
        float: left;
    }
    .list-item .big-location{
        display: none;
    }
    .list-item .list-txt {
        width: 658px;
        line-height: 24px;
        float: left;
    }
    .list-item .list-txt h3 a{
        margin-bottom: 6px;
        font-size: 16px;
        font-weight: normal;
    }
    .list-item .list-txt p {
        margin-bottom: 6px;
        color: #999;
    }
    .list-txt i {
        font-size: 18px;
        color: #ff3c1c;
        margin-right: 5px;
    }
    .list-item .list-txt .list-txt-price span {
        color: #ff3c1c;
        font-weight: bold;
        font-size: 14px;
        margin-right: 20px;
        font-style: normal;
    }
    .list-itembig{
        padding: 5px 3px;
        width: 180px;
        height: 385px;
        float: left;
        padding: 25px 0 18px;
        margin: 0 18px;
    }
    .list-itembig .list-img {
        width: 180px;
        height: 246px;
        position: relative;
    }
    .list-itembig .list-img p {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 30px;
        line-height: 30px;
        text-align: center;
        background-color: #ca3015;
        color: #fff;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        cursor: pointer;
        display: none;
    }
    .list-itembig .list-txt h3{
        margin-top: 6px;
        margin-bottom: 6px;
        height: 36px;
        overflow: hidden;
    }
    .list-itembig .list-txt h3 a{
        font-size: 12px;
    }
    .list-itembig .list-img img {
        width: 180px;
        height: 246px;
    }
    .list-itembig .list-txt .list-txt-des,
    .list-itembig .list-txt .list-txt-elec,
    .list-itembig .list-txt .list-txt-loca{
        display: none;
    }
    .list-itembig .list-txt p {
        margin-bottom: 6px;
        color: #999;
    }
    .list-itembig i{
        display: none;
    }
    .list-itembig .list-txt .list-txt-price span {
        color: #ff3c1b;
        font-weight: bold;
        font-size: 14px;
        margin-right: 20px;
        font-style: normal;
    }
    .list-itembig:hover .big-location{
        display: block;
    }
</style>